package com.quickcode.example.thread;

/**
 * Created by 张波 on 2019/12/18.
 */
public class ThreadExample {

    public static void main(String[] args) throws InterruptedException {
//        Thread thread = new Thread(new Runnable() {
//            @Override
//            public void run() {
//                System.out.println("我开始执行了");
//                System.out.println("执行完成");
//            }
//        });
//        thread.run();
//        TimeUnit.SECONDS.sleep(2);
//        thread.start();
//        TimeUnit.SECONDS.sleep(2);
//        System.out.println("start结束");
//        thread.run();
//        TimeUnit.SECONDS.sleep(2);
        String str = "adbc\ndef\r\nsl\r\n";
        System.out.println(str);
        System.out.println("========================");
        System.out.println(str.replaceAll("\r\n", ""));
        System.out.println("========================");
        System.out.println(str.replaceAll("\r|\n", ""));
    }
}
